package com.well.menjin.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.well.menjin.model.TreeNode;
import com.well.menjin.service.IOperatorService;
import com.well.menjin.service.impl.OperatorServiceImpl;



@Controller
@RequestMapping("/login")
public class LoginController {
	@Autowired
	private IOperatorService operatorserivce ;
	
	@RequestMapping(value= "checklogin")
	public String checklogin(){
		return "index";
	}

	@RequestMapping(value = "/getMenus")
	@ResponseBody
	public List<TreeNode> getMenus (String node){
		List<TreeNode> menus =operatorserivce.getMenus(node);
		return menus;
	}
	
	
	
//	@RequestMapping(value = "/getMenus1")
//	@ResponseBody
//	public List<TreeNode> getMenus1(String node){
//		List<TreeNode> menus = new ArrayList<TreeNode>();
//		TreeNode treeNode = new TreeNode();
//		treeNode.setId("quyunmanage");
//		treeNode.setText("区域信息管理");
//		treeNode.setLeaf(true);
//		menus.add(treeNode);
//		return menus;
//	}
}
